#{extends 'layout.html'/}
#{set title:messages.get('crud.list.title','系统用户管理')/}

<div id="crudList" class="${type.name}">

    <div id="crudListSearch">
        <form enctype="application/x-www-form-urlencoded" accept-charset="utf-8" method="get" action="/managers/list">        
        	<input type="text" value="" name="search"> <input type="submit" value="搜索">
		</form>
    </div>

    <div id="crudListTable">
        #{crud.table fields:['id','rolid','mannum','manname','manstates','操作']}
         #{crud.custom 'rolid'}
         	${service.ManngerService.findrole(object.rolid)?.rolename}
         #{/crud.custom}
         #{crud.custom 'manstates'}
         	${object.manstates == 0 ? "正常":""}
         	${object.manstates == 1 ? "禁用":""}
         	${object.manstates == 2 ? "回收":""}
         #{/crud.custom}
         #{crud.custom '操作'}
	        <table border="0">
	            <tr>
	                <td style="text-align:right" >
	                    #{form @delete(object._key())}
	                    	<input type="submit" value="删除" />
	                    #{/form}
	                </td>
	                <td>
	                	  #{form @show(object._key())}
                   			 <input type="submit" value="修改" />
                   		 #{/form}
	                </td>
	            </tr>
	        </table>
       	 #{/crud.custom}
        #{/crud.table}
    </div>

    <div id="crudListPagination">
        #{crud.pagination /}
    </div>

    <p id="crudListAdd">
        <a href="/controllers/Managers.addmanngers">添加</a>
    </p>

</div>
